The appearance of single photon avalanche diodes (SPADs) in the field of PET detector modules made it necessary to apply more complex optical design methods to refine the performance of such assemblies. We developed a combined simulation tool that is capable to model complex detector structures including scintillation material, light guide, light collection optics and sensor, correctly taking into account the statistical behavior of emission of scintillation light and its absorbance in SPADs. As a validation we compared simulation results obtained by our software and another optical design program. Calculations were performed for a simple PET detector arrangement used for testing purposes. According to the results, deviation of center of gravity coordinates between the two simulations is 0.0195 mm, the average ratio of total counts 1.0052. We investigated the error resulting from finite sampling in wavelength space and we found that 20 nm pitch is sufficient for the simulation in case of the given spectral dependencies.