Optimal dispersive estimates for the wave equation with $C^{(n-3)/2}$ potentials in dimensions $4\le n\le 7$