I think you’ve been coddling a couple of favorites a little, and it’s starting to bite you. I know it doesn’t feel like you are coddling, but to them it does because there have been no consequences for interrupting the learning in your classroom.
Time to put a stop to that little game.
By the time kids are in fifth grade, they are aware enough of the actions of other children and this can be used to help modify their behavior.
But as always, when setting expectations, it will be necessary to practice.
Expectations for properly getting attention
Start by reminding the entire class about how to politely get your attention and wait patiently for it. Walk the class through the process a few times and even have some play acting where you designate a child to “get your attention” and then wait patiently for 30 seconds until you can talk to her.
This resets expectations for the entire class without singling out these two boys… at least initially.
Then when they continue in their ways (and they will), it will be time to put on your serious voice and privately remind them of the expectation and have them look around at all the rest of the students working on lessons. Point out that they're interrupting the teaching and learning of everyone else and it's really not something that you can accept.
Of course, you want to maintain a relationship with these boys, but they do need to get the point. So say it in a “pointed” way. But no need to raise your voice. Just state the facts.
Practice makes (almost) perfect
Reminding is not enough of course. You'll need to have them practice on the spot where they show you they know how to get your attention and then you walk away while they wait patiently and you come back to them. You won't make them wait too long, but the fact that they're getting individual attention is a good reminder for them.
As usual, praise them when they get it right in the future and thank them for waiting but if they slip up even once, go through the practice session again.
How accepting is your classroom community?
You said one other thing, though, that causes me concern: the “weird looks” from the other students.
Along with correcting their behavior, you may need to have some group lessons about team building and accepting differences. Fifth graders are certainly not too old for many of the books on the list at this link and you may find them helpful for generating class discussion.
Ultimately, everyone needs full freedom to be themselves – even their goofy selves – without judgement. As long as they respect learning, of course.