I simulated this:

V(1) is the flyback voltage without diode.
V(2) is the flyback voltage clamped by a 1n4148, turn off time of the transistor base drive is 5 ns.
V(3) is the flyback voltage clamped by a 1n4148, turn off time of the transistor base drive is 0.05 ns.
V(4) is the flyback voltage clamped by a slow rectifier diode (no 1N400x available), turn off time of the transistor base drive is 5 ns.
Regardless of turn-off time and diode type, clamping is effective in all sub-circuits 2...4. Only sub-circuit 1 shows almost 300 V flyback voltage!

V(1) is the flyback voltage without diode.
V(2) is the flyback voltage clamped by a 1n4148, turn off time of the transistor base drive is 5 ns.
V(3) is the flyback voltage clamped by a 1n4148, turn off time of the transistor base drive is 0.05 ns.
V(4) is the flyback voltage clamped by a slow rectifier diode (no 1N400x available), turn off time of the transistor base drive is 5 ns.
Regardless of turn-off time and diode type, clamping is effective in all sub-circuits 2...4. Only sub-circuit 1 shows almost 300 V flyback voltage!