The interaction of a laser pulse with a thin high-density plasma slab
(foil) is proposed as a mechanism for producing laser pulses with the
appropriate shape (sharp leading and/or rear edges). Such a pulse is o
ptimum for the excitation of high-amplitude wake fields in underdense
plasmas. It is shown (analytically and via particle-in-cell numerical
simulations) that a phase-stable regime of unlimited particle accelera
tion can be realized in inhomogeneous plasmas.