A precise optical transmission spectrum of the inflated exoplanet WASP-52b