Genes aren't selected for the good of the species as a whole. It is irrelevant whether a shorter lifespan would be optimal for the species. A total lack of violent tendencies towards other humans would surely be optimal for the species as a whole, but a gene producing that behaviour would quickly die out as a mutation that took advantage of everyone else's passivity would flourish.
So genes only care about their own propogation. But that doesn't mean that they only care about the organism that carries them around. You care about your children, as they contain copies of your genes. You care about your brothers and sisters, because their genes overlap substantially with yours. And you care about your cousins and more distant relatives, for the same reason. As an evolutionary biologist once said, "I would lay down my life for two brothers or eight cousins" (mentioned in this article http://en.wikipedia.org/wiki/Kin_selection).
As one gets older, one's chances of reproducing may decline (although if you manage to attain greater social status and material wealth, for men at least, that may not always be the case), but the number of descendants that you have an interest in will quite possibly increase. You are still a boon to your genes if you are a grandfather/mother, and genes which allow you to live longer will allow you to nurture those with similar genes to you for longer.