Temperature dependence of the optical response: Application to bulk GaAs using first-principles molecular dynamics simulations