Magnetization reversal triggered by spin-polarized current in magnetic nanowires