The influence of pulse width on transient thermally induced optical nonlinearities in a Kerr nonlinear medium