Operational amplifier as a comparator at high frequency
The recommendations for you are very simple.


Use a comparator for this application instead of an opamp.
Select a newer part that operates with orders of magnitude faster response time.


It would be the very best thing if the 741 could be eradicated from face of the earth.

Here is what can be achieved with the venerable LM393 at 5kHz. The shown circuit will work even up to about 50kHz before the delay of the LM393 starts to distort the PWM duty cycle.