Reconstruction of general relativistic cosmological solutions in modified gravity theories