Using shaped laser pulses, we increase the yield of ultrafast electron injection from the sensitizer to TiO(2) nanocrystals in the core part of a dye-sensitized solar cell. The temporal structure of the optimized excitation pulse is in clear correlation with nuclear oscillations in the impulsively excited dye molecule. From DFT structure optimization and normal mode analyses we identified the modes which are responsible for the oscillations. The best pulse shape suggests Impulsive Stimulated (anti-Stokes) Raman scattering as a key process of optimization.