It seems to me that the "d" is flapped in "I don't know" in American English. Am I right? If I am, I'm wondering if t/d is always flapped at the begining of the word when it is preceded by a vowel? For instance in "I did it"?
Yes, that d flaps in my casual speech. I think what happens is that the following vowel loses its stress and this shifts the d into the preceding syllable, making it subject to the flapping process. If that's right, an initial t in a word whose first syllable is unstressed should also flap. We can test that with "I'll go tomorrow/today". Those t's flap, for me. But here's one that doesn't: "He's so tyrannical!" (perhaps because I wouldn't use that word in informal speech).