Measurements of density fluctuations by modulation spectroscopy