We demonstrate that the compensation of self-phase modulation by third-order dispersion can be exploited in the design of fiber amplifiers with tens of microjoules pulse energy. At the highest energies, the amplified pulse accumulates nonlinear phase shift as large as 17 pi. Gain-narrowing occurs in the final amplifier stage, but shorter pulses are still generated with larger nonlinear phase shifts. A large-mode-area Yb-doped photonic crystal fiber amplifier generates diffraction-limited 30 microJ pulses, which are compressed to 240 fs duration. These are converted to the second harmonic with 48% conversion efficiency, as expected theoretically, which confirms the pulse quality.