Speeding is an Absolute Liability Offence
Speeding is an absolute liability offence (R. v. The City of Sault Ste. Marie) which means your mental state at the time you were pulled over for speeding is irrelevant when the Justice of the Peace determines whether you are guilty of the charge. In other words, if you have been charged with a speeding offence, the prosecution only has to prove you committed the act in order to secure a conviction. Explaining why you committed the offence will usually not result in the Justice of the Peace finding you innocent of the charge, unless you are going to use the defence of necessity.
In order to use the defence of necessity successfully for speeding (Perka v. R), you will need to satisfy four requirements and those are that,
1) You needed to commit the act to avoid immediate peril
2) There was no other reasonable alternative
3) The harm caused by you was less than the harm avoided and
4) You could not have foreseen the emergency
If you were in fact speeding and the defence of necessity does not apply in your particular case, challenging the officer's evidence and attempting to raise reasonable doubt as to whether he or she clocked your speed accurately would be a more viable defence tactic to take