You should always pronounce ㄷ as ㄷ.
The Latin letters d and t and the matching English sounds do not reflect Korean pronunciation. Don't worry about Romanization or thinking about things in English. They are two very different languages with very different sounds.
SOUND CHANGES ASSOCIATED WITH ㄷ :
When ㅎ follows it, it will sound like ㅌ.
("Like t")
When ㄷ is 받침, it will sound like ㄸ.
("Like d")
Any other time, ㄷ is a unique sound not able to be expressed by d or t.