A class of nonlinear time-delay systems and related optimal problems