Your problem may be heat related, but I think you ought to check for something else before you start on that path.
What you describe is often caused by a vacuum building up in the fuel tank, which starves the engine for fuel.
After the engine is off for a short while, the vacuum will bleed away and the fuel will once more flow enough for the engine to run for a short while. The fuel leaving the tank will cause another vacuum, which starves the engine again.
Check to make sure that the gas cap is venting.
Good Riding and Wrenching,
Jim