Optimal Denoising For Photon-Limited Imaging