Do applicants have to pay separate fees to apply to two PhD programs at the same school?
I strongly suspect that you would have to file two different applications to apply to two different programs, and each application would likely require a separate fee to file. This is in part because you would have separate essays and letters of recommendations for different programs, each of which would require separate handling and consideration. 

If this is a hardship, though, some schools offer an application fee waiver to students who are of limited financial means, but you may have to contact the individual school to inquire about the possibility, because it may not be publicly stated that such an option exists.