Beyond the diffraction limit via optical amplification