It's not illegal, but I have it on good authority (Pirelli tyre mfg tech) that an HD tube might be more prone to overheating damage than a thin standard one - if you think of it a thin tube will deform less and therefore generate less heat through flexing, and what heat it does generate is dissipated more quickly because it's thinner ...
Me recent experience in France was painful and fukkin embarassing. I swapped the Heidies for Anakees On Saturday- the day before leaving for Belgium. Both tubes had been slimed and the rear had one previous repair. The next morning all seemed ok, pressures up and the journey to Folkestone was fast and uneventful.
However I touched a peg down as I joined the motorway out of the Tunnel - I put this down to the Anakees having a lower profile than the Heidis so thought nothing more of it - 90km later as I was leaving the Motorway again the back end slewed out so much I was lucky to stay in the seat.
I pulled over and dug out the toolkit - had levers, repair kit and compressor... but I'd forgotten to pack the socket for the rear wheel..

fukkit!
Thankfully the tyre was stinking hot and slipped off the rim easily enough - the tube seemed intact which was a bonus but the tyre was full of the shitty slime. I pulled the tube out from the side, hooked it over the swingarm and found that it had a 20mm split in it... fukkit²
I had a repair patch that was big enough to cover the rip, but the slime was everywhere - every time I cleaned it up more squeezed out - it was a nightmare. Finally I managed to get it clean enough to stick and without any more oozing - re-inflated the tyre and thought all was well - until 20km further on the back end stepped out again ... Fukked³.
Same routine, tyre off the rim, cleaned out the shite, found a few more patches ... gave up and tried to call the RAC who weren't interested cos I didn't have European cover (no surprise really) but after 2 hours of very expensive mobile calls the best I could manage was a €300 recovery to the nearest town and 'You're on your own after that!' Bear in mind it was rural France on a Sunday afternoon - I was fukked⁴.
Thankfully a French guy called Ludo came by having passed me 3 hours before, he scooted off to a local Triumph dealer who was having an open day and came back with a new (€40.00 !) tube and an adjustable spanner. 10 minutes later I was done - unfukked and on my way....
The moral of the story - don't be complacent, disaster can strike - even if you're riding a BMW! Keep a spare tube and minimum toolkit with you - and make sure you know what's in it and also how to use it!
If I honest I think part of the first repair's failure was down to my sh!tty little Halfords repair kit - the stuff was old, probably 3 years or so and doubtless past its best. Since them I've spoken nicely to my local tyre repair shop and exchanged a couple of beers for a handful of BIG patches and some professional rubber cement ... Sorted!
G