Any high quality paintable caulking will work. I like Dap Dynaflex 230. It has minimal shrinkage and is very flexible. Another caulking is Dap's PowerPoint 200.
For very wide cracks or areas that have a lot of movement give Big Stretch by Sashco a try. All three are good products.