A class of semilinear delay differential equations with nonlocal initial conditions