I have a very similar sounding issue but at a lower RPM threshold, more like around 3K RPM, and I don't remember any backfiring.
The bike has a fully charged battery and starts just fine, but after about 10 minutes of riding, no longer holds an idle. If the revs drop to around 2K it starts sputtering, and at 1K it dies and then is difficult to start up again. If I keep the engine revved to 3K at stop lights and such, I can keep it from dying, but this makes it hard for me to slow down very well ahead of them because I can only use my rear brake
However, if I let the bike sit for a while I can start it up with no problems, and ride normally for another 10 minutes before it starts having the lower-rev problems again.
It's not the battery dying (weak alternator) because the bike starts fine after sitting for a while. I checked my air filters and they're fine too.
I've had dirty carbs in the past and this doesn't seem like that. When I ride at suitable speeds, the engine is smooth, not jerky or rough, plus they're fine when I first start riding, whereas when the carbs are dirty it's apparent pretty much immediately.
I refilled it with new fuel, poured an entire can of Seafoam into the tank and took it for a ride. Still had the problem.
I checked my spark plugs, which are Iridium plugs about a year old, and they look OK. Nothing black or carbonated.
Now what? Take off the fuel petcock? -- And look for what, and do what?