Topologically penalized regression on manifolds