Entangling Nuclear Spins Using Photoexcited Triplet States