Probably. (Although this is fairly unusual and advanced magic, and those are the only two instances of it in the canon.)
The best discussion of this I can find comes in a JK Rowling interview in 2005 with The Leaky Cauldron and Mugglenet, where she discusses the aspect of sacrificial protection, and whether it would have worked for James:
ES: This is one of my burning questions since the third book – why did Voldemort offer Lily so many chances to live? Would he actually have let her live?
JKR: [silence] Can't tell you. But he did offer, you're absolutely right.
Don't you want to ask me why James's death didn't protect Lily and Harry? There’s your answer, you've just answered your own question, because she could have lived and chose to die. James was going to be killed anyway. Do you see what I mean?
I’m not saying James wasn't ready to; he died trying to protect his family but he was going to be murdered anyway. He had no – he wasn't given a choice, so he rushed into it in a kind of animal way, I think there are distinctions in courage. James was immensely brave. But the caliber of Lily's bravery was, I think in this instance, higher because she could have saved herself.
Now any mother, any normal mother would have done what Lily did. So in that sense her courage too was of an animal quality but she was given time to choose. James wasn't. It's like an intruder entering your house, isn't it? You would instinctively rush them. But if in cold blood you were told, “Get out of the way,” you know, what would you do? I mean, I don't think any mother would stand aside from their child. But does that answer it? She did very consciously lay down her life. She had a clear choice—
ES: And James didn't.
JKR: Did he clearly die to try and protect Harry specifically given a clear choice? No. It's a subtle distinction and there's slightly more to it than that but that's most of the answer.
I think it’s the bravery, and the fact that they chose to die rather than let the other person be harmed, that conferred the protection. To me, this reads as if James’s sacrifice would have protected Lily and Harry, if he’d been offered that choice. So it can work for romantic love.
You might be able to go further: perhaps this protection is conferred if you are offered the choice to live, but sacrifice yourself to protect somebody who you don’t actually love. Or would that fall under “love of your fellow humans”? The unusual aspect of Lily’s murder was the choice, less her maternal love for Harry (although that surely had a part in it).
(Note that this interview was written before the publication of Deathly Hallows, so the fact that Snape loved Lily, and asked Voldemort to spare her, was then unknown. It may be why he gave her a choice. If it was Neville’s mother on the line, I’m sure she would have made the same choice, but it might never have been offered.)
Consider also that there was romantic love between Harry and Ginny when he sacrificed himself in Deathly Hallows, but this may have been part of the wider “love for fellow humans”.
Also note that in the same interview, we get confirmation that this is an unexplored, and unknown branch of magic:
MA: Did she know anything about the possible effect of standing in front of Harry?
JKR: No – because as I've tried to make clear in the series, it never happened before. No one ever survived before. And no one, therefore, knew that could happen.