Mech, instead of "brushing the wire" just attach a momentary switch to it.
If the light switches constantly between flash and solid, then what you can do is attach an accelerometer to the frame of the bike and have a circuit switch between flash or solid whenever it detects deceleration (braking).