Laser pulse shaping is reported for applications on multiphoton processes in dye molecules. Particularly phase-tailored pulse shapes are employed for two-photon excited fluorescence of dyes in a liquid environment, also at the distal end of an optical fiber, in order to improve the contrast between dye markers having similar excitation spectra. Precompensation of the optical fiber properties is utilized by analytical pulse shaping in order to receive specific parametric pulse forms after the fiber. This will lead to new endoscopic imaging applications with an increased fluorescence contrast. Moreover, selective excitation is also demonstrated for three-photon transitions of the two dyes, p-Terphenyl (PTP) and BM-Terphenyl (BMT), in solution by using shaped pulses without a fiber. A good agreement between experiment and theoretical simulation is obtained. With this approach it is possible to achieve a considerable change of the fluorescence contrast between the two dyes which is relevant for imaging applications of biological molecules.