If it's only happening when the motor is very hot then i'd suggest the oil is either shot, or the oil pump has some wear in it. Oil grade could have a bearing on it to. 10W/40 will not hold pressure as well as 15W/50 when hot. If the oil is old then the problem could be worse. If the light goes out when you rev the engine, i'd guess the switch is OK. It could be worth asking to have the oil pump clearances checked whilst the bike is in for the service?