A framework for optimal temporal reduced order modeling of nonlinear dynamical systems