You must prime oak trim before applying the finish coat or the finish will soak into the wood and yellowing will occur. Yellowing is what happens when white paint pulls the resin in the wood grain out and it shows up in the paint finish. Use a wood stain-blocking primer to remedy this problem. After the primer blocks the wood grain resin, you can then paint the oak with two coats of white finish paint.
Fill the finish nail holes in the trim work with paintable wood putty. Press the putty into the holes with your fingers and then scrape it smooth with a 2-inch putty knife. Wait 24 hours and then sand the puttied holes and any rough wood fibers along the length of the trim work. Sand the corners where two pieces of trim work come together until the corners are smooth and well-fitted. Use 120-grit sandpaper. Dust the trim with a tack cloth.
Load a tube of caulk into a caulking gun and cut the tip off with a utility knife. Caulk the edges of the trim where it meets with the wall or ceiling. Run the tip of the tube of caulk along this crack and squeeze the caulking gun trigger until a bead of caulk begins coming out. Move the gun a couple feet and then go over the bead of caulk with your fingertip to smooth it out and seal the crack. Wipe excess caulk off your finger onto a wet painter's rag. Allow the caulk to dry for 24 hours.
Lay a piece of painter's plastic beneath the trim you plan to paint.
Open the can of stain-blocking wood primer and dip the bristles of the paintbrush into it to load the brush. Wipe the excess paint off the sides of the brush along the inner edge of the paint can.
Prime the edges of the trim and then the face 12 inches at a time until you've primed all of the trim white. Wait 24 hours.
Sand the primed trim work with a piece of 150-grit sandpaper to knock down any wood fibers that stood up as the primer paint dried. Dust the primer with a tack cloth. Apply a second coat of primer paint. Wait 24 hours. Run your hand over the second coat and feel for smoothness. If it is smooth, then the trim is ready for the finish coat. If it is still rough, sand it again and add third coat of primer.
Apply the first coat of white finish paint over the trim. Paint the edges and then the face of the trim 12 inches at a time until you've painted all of the trim white. Wait 24 hours. Inspect the color for yellowing. If it has yellowed, then apply another coat of stain-blocking primer paint, sand it smooth and then apply a second coat of finish. If it hasn't yellowed, then apply a second coat of finish paint for a white finish.
Inspect the trim for yellowing after you apply each coat of paint. If yellow continues to occur, try a different brand of stain-blocking primer.