Fill holes in the oak trim with wood putty. Use your finger to wipe the putty into the cracks and holes in the trim, and then smooth the surface as much as possible. Wait for the putty to dry per manufacturer directions.
Caulk large gaps between the molding and the wall. Apply a small amount of caulk and smooth it with your finger. Wait for the caulk to dry per manufacturer directions.
Sand the oak trim with #100 grit sandpaper. You only need to lightly sand the trim to rough up the surface of the oak. This is especially important if the trim has a high gloss finish on it. Sanding should also remove any bumps left over from the dried wood putty.
Vacuum the oak trim and wipe it with a damp cloth to remove the dust. Wait for the trim to dry.
Apply primer over the oak trim with a paintbrush. An angled brush will allow you to carefully paint without getting paint all over the adjacent walls. This will make painting easier (reducing the number of coats), and will help the paint to stick to the trim. Wait for the primer to dry completely.
Paint the oak trim with an angled paintbrush. Work from the bottom of the trim upwards. Apply one coat of latex paint and allow it to dry. Paint a second coat of paint on the trim. Give the trim 24 hours to dry before normal use.