Investigation of the role of temperature fluctuations on spectral line shapes