Energy distribution function of quasiparticles in mesoscopic wires