my dictionary (Oxford Duden) states that sandwich can be either der or das...
Yes, according to "Duden", the most important German dictionary, it can be either masculine or neuter. (Personally, I would always say "das Sandwich", though). http://www.duden.de/rechtschreibung/Sandwich
Doesn't Duolingo accept both genders?
In almost everything I have answered before on Duolingo, it required "Sandwich" to be treated as masculine. If it is both, I understand, but it should not claim that you are wrong when it has been teaching you that you were right earlier.