Representation formulas for solutions of linear uncertain fractional differential equations and optimal control