Even though it seems absurd for a cop to give a bicycle rider a speeding ticket, you were probably putting yourself if not others at risk by riding 40-50 mph in a 25 mph zone....almost 2x's the speed limit. A pedestrian or little kid could easily step out and not see or hear you.