This is for me the weakest play from any character in the series. I've searched through the internet to see if someone had the same thought that I did but haven't found any mention to it.
Rem wants to protect Misa
Rem needs to be alive to protect Misa
Then, Rem can't protect Misa if she's dead
With this simple point in mind, what she did was only the last resource she had, a resource that she should of have taken after discarding other ways of action. If she's dead nothing stops Light from killing Misa on his own (which was his initial plan).
Why didn't she talk to L and negotiate? Give him two options:
Option 1 (what she partially did): I kill you, Watari and the whole task force and you'll never catch Kira nor Misa, failing in every aspect of your investigation.
Option 2 (what she could have done before going for Option 1): I tell him that I can see who's the first Kira, and that the second Kira is Misa. But that as a Shinigami who's involved with Misa, I will not let anything happen to her, so I can either kill them all, or give them, in exchange for Misa's innocence), the name for the first Kira. If they refuse this deal, then they will have none (and go to Option 1).
There's a chance L would of rejected this deal, for an ideal about finding through himself who's Kira or an ideal of justice where he wouldn't want Misa to have immunity. But in the face of death, there was a chance where he could see that one of the two options had a better outcome than the other.