You can substitute another non-dairy fat for the butter in hamantaschen dough to make it dairy-free. And while I haven't done it myself, I've heard of people using a 1-to-1 gluten-free flour substitute with good results.