Shapes of neutron inelastic scattering spectra and nuclear temperatures