Use smaller finish nails to attach oak trim. 6d, 8d and 10d nails are usually adequate and are much less likely to split the wood than 12d and 16d nails.
Dull the point of the nail before you drive it into the trim by placing the head of the nail on a hard surface and tapping the point with a hammer. This will force the nail to cut a path through the wood rather than wedging its way through and splitting the wood.
Lubricate the nails by dipping them in petroleum jelly to reduce the force of friction as you drive them.
Avoid driving nails too close to the edges of trim boards. Maintaining a space of at least 1 inch between the end of the board and the nail will reduce the possibility of the board splitting out toward the end.
Pre-drill holes for the nails if the wood is very dry or the trim is very thin. Although you can use a drill bit with a diameter slightly smaller than the shanks of the nails, you can easily make a perfectly-sized bit by simply cutting off the head of one of the finish nails using a wire snipper--use that nail as a drill bit.
Avoid nailing near knots where the wood is harder and less flexible. If you must nail near a knot, pre-drill a pilot hole first.