Learning Dynamics from Infrequent Output Measurements for Uncertainty-Aware Optimal Control