Optical nuclear polarization in the gas phase