Optimization of measurement parameters in Doppler broadening spectroscopy