Using Noether symmetries to specify f(R) gravity