1N4007 or MBR340 for Flyback ?

You didn't mention if the motor is being PWM'd or on continuously.

  1. If PWM'd I would use the MBR340 + a 0.01µf ceramic capacitor.

Reasoning: Assuming your switching times are fast (i.e. the time it takes to transition from On to Off and vice versa. The 1N4007 is not good because it will conduct in the reverse direction for a short period of time when switched quickly (Google reverse recovery time and /of look here Reverse Recovery Time of a diode)

The 0.01µF capacitor is to reduce voltage noise spikes from the brushes. You would really like more but a large capacitor will interfere with the switching. 0.01µf seems to be a good compromise.

  1. If no PWM I would put a 1.0µf or at least a 0.1µf ceramic capacitor across the motor.

Reasoning:
Same as above but with no PWM the capacitor can be much larger. You don't want to go much larger because the larger capacitors and non ceramic capacitors are not as capable at high frequencies (of the brush noise).

Grumpy_Mike had an excellent tutorial on capacitors at high frequencies.

In both the above cases, the capacitor should be as close to the motor terminals as practical.

Good luck