FitBasis class to optimize contracted basis functions