The Geant4 Application for Emission Tomography (GATE) is an advanced open-source software dedicated to Monte-Carlo (MC) simulations in medical imaging involving photon transportation (Positron emission tomography, single photon emission computed tomography, computed tomography) and in particle therapy. In this work, we extend the GATE to support simulations of optical imaging, such as bioluminescence or fluorescence imaging, and validate it against the MC for multilayered media standard simulation tool for biomedical optics in simple geometries. A full simulation set-up for molecular optical imaging (bioluminescence and fluorescence) is implemented in GATE, and images of the light distribution emitted from a phantom demonstrate the relevance of using GATE for optical imaging simulations.