A Numerical Method for Solving Fractional Optimal Control Problems Using Ritz Method