On the moment problem in optics