Why is "I am going to write you a letter" not accepted?
"I am going to write you a letter." Is one of the accepted answers. We have no reports for this sentence from you so it is hard to say what was wrong, probably some typo.
is the difference between pisu and napisu one of perfective and imperfective? Or can either be used at any given time?
Yes, it is. Psát is imperfective, and napsat is perfective.