Multiphoton intrapulse interference. II. Control of two- and three-photon laser induced fluorescence with shaped pulses