Any petrol engine can have an electronic microswitch on the gearstick or paddle arrangement, which can activate a relay, which in turn cuts the ignition for the duration of the shift action.
You can get micro-switches for a euro... relays and wiring is simple enough. No race team would bodge it that simply.
A version for motorcycles is this :
It’s the Dynojet Quick Shifter (DQS), and this one allows full-throttle, clutchless up-shifting.
http://www.partsmag.com/0402/dynojet-0402/dynojet-0402.html
in short, its an ignition system, which when it detects pressure on the foot control push/pull rod, cuts the ignition to the cylinders - (the dynojet ignition replaces the stock version).
I'm pretty sure you can get one for the engine in the motorcycles that gives its engine to formula bmw.
All of this is well off topic though, as formula one is sealed engine, strictly governed racing. What can be done, and what is allowed, are very different.