Laser cooling of rotation and vibration by optical pumping