I just came back from Zanzibar. I went trough a lot of trouble to take my speargun with. In the end I only used it once and did not shoot anything. This was in Nungwi, on the northern tip of Zanzibar island. If your organizational skills are better than mine you can probably get a local fisherman to take you out for $50 or so. I did not really trust them not to leave me behind though. There is plenty of game fish around, and you can hire a fishing charter for about $600 for the day on a speed boat. They catch barracuda, tuna, sailfish, dorados ect. $600 was a bit much for me though, and I don't know if the guy will take you.
Pemba will be even more difficalt. I did not take my gun with when I went there, and I was rather glad. The diving comminuty there is very protective of there reefs. Aslo I did not see many game fish while scuba diving in the area.
....And as pstruhos said spearfishing in TANZANIA is illegal.