Ukraine's president has said he would step down in return for peace and NATO membership for his country.