Yes. Note that if for all then for any polynomial . By Wierstrass aproximation theorem, this set (polynomials) is dense in where this last is considered with the uniform norm. The functional is linear and continous and is zero on a dense subset of the domain so it must be zero everywhere. So for all . It is a well known result that under this conditions .
Edit: Actually, we would need f to be continous, but since it's R-I it's continous a.e. so there is no real problem.