Electron spin precession in semiconductor quantum wires with Rashba spin-orbit coupling