Optical amplification in two-dimensional photonic crystals