Nuclear spin pumping under resonant optical excitation in a quantum dot