Es ist das richtig:

DDRD = (1 << PD4);
DDRD |= (1 << PD5);

oder besser:

DDRD |= (1 << PD4) | (1 << PD5);