Control of multiphoton molecular excitation with shaped femtosecond laser pulses