Don't confuse Lord Rama with ordinary jivas. Rama is an incarnation of God. The Lord is not subject to the laws of karma. He takes birth through His sweet Will, not from the effects of past karma.
All people have a mixture of the three gunas in them. Killing is subject to your duty. Krishna says to Arjuna in Gita Chapter 2 (Swami Nikhilananda translator):
Considering also, your own dharma, you should not waver; for a kshatriya nothing is better than a righteous war.
Happy indeed are the kayatriyas, O Partha, to whom comes such a war, offering itself unsought, opening the gate to heaven.
But if you refuse to wage this righteous war, then, renouncing your own dharma and honour, you will certainly incur sin.
..37. If you are killed in the battle, you will go to heaven, if you win, you will enjoy the earth. Therefore arise, O son of Kunti, resolved to fight.
- Regarding alike pleasure and pain, gain and loss, success and defeat, prepare yourself for battle. Thus you will incur no sin.
Whether an action is good or bad, sattvic or tamasic, depends upon your dharma. If you are a soldier in the army, it is your duty, your dharma to defend your country. As such your dharma may include killing. On the other hand, a sadhu who has renounced the world, has a duty to not kill. A householder has a duty to defend his family. If someone enters your house to do injury to your family, it is your duty to defend them, to strike blows if necessary; to not defend them is tamasic. On the other hand, a sadhu cannot raise his hand in defense of himself, to do so for him is tamasic. One's actions to be judged as tamasic, rajasic, or sattvic, depends upon your personal dharma. As Krishna says in the last verse quoted, the secret is to regard the outcomes of your dharmic duties without attachment.