Genes which produced traits which fostered proliferation of themselves tended to spread through the population. This is basic Darwin. This tendency is true not only of physical and mental traits, but also psychological ones--in my invented example, generosity. Once a psychological trait has become established and widely shared in a population, that trait will seem "normal," and so become a basis for shared values, which, when further institutionalized, become a system of morality.
I think you do have the idea, Dragontongue. One caveat: I have simplified greatly. In actual practice, things are far more complicated than in my example. Nevertheless, my example does explain, as you asked, how morality could have arisen via evolution.
Okay! I think I've got it, then. :) So (just to make sure)... supposing humans had evolved in such a way that abortions were impossible, would rape be an acceptable way to proliferate your genes? Obviously the mother might not take care of the child once it was born, but when a woman finally gives birth to the baby she's carried for nine months the maternal instinct usually kicks right in. Assuming that worked in nine out of ten cases, would there be no (or little) moral stigma associated with rape?