Controlled dissociation of I2 via optical transitions between the X and B electronic states