how to caulk moldings and millwork

Gaps this small between the moldings and the wall can be filled with caulk.