Optimal vaccine distribution in a spatiotemporal epidemic model with an application to rabies and raccoons