A framework for denoising two and three-dimensional Monte Carlo photon transport simulations using convolutional neural networks