We report a versatile method to polarize single nuclear spins in diamond, based on optical pumping of a single nitrogen-vacancy (NV) defect and mediated by a level anticrossing in its excited state. A nuclear-spin polarization higher than 98% is achieved at room temperature for the 15N nuclear spin associated with the NV center, corresponding to microK effective nuclear-spin temperature. We then show simultaneous initialization of two nuclear spins in the vicinity of a NV defect. Such robust control of nuclear-spin states is a key ingredient for further scaling up of nuclear-spin based quantum registers in diamond.