I think this is a case where the words that are used don’t carry the meanings we’re most used to seeing them in.
We think of altruism as helping others and it carries a very good connotation. Selfishness on the other hand carries a very negative connotation. Selfishness in our society is almost never seen as a good thing.
As used in the quote, altruistic and selfish are the only two classifications in a broad game theory type experiment. Basically you set some rules, go at the game with different very simple and rigid strategies, and see what strategy comes out best. (wikipedia has some good stuff on game theory check out the biology section)
In biology the definitions are much different than in our society. “winning” the game basically comes down to breeding. Whoever passes on their genes wins. So there are really only two opportunities to be selfish or altruistic. Breeding and surviving.
So the quote basically comes down to individuals should make sure their genes are passed along within a group (selfish) but make sure the group as a whole survives (altruistic).
So beat up that other gorilla to make sure you get to mate, but if the lions come, make sure no one gets eaten.
Translating the same idea in a more human and socially acceptable way would be something like “Take care of your family first, but make sure you help your fellow man in need”... which I can get down with.