An efficient computational method based on the hat functions for solving fractional optimal control problems