Nonlinear delay differential equations and their application to modeling biological network motifs