Well, sort of, mostly they were used to finish off damaged ships not worth another torpedo. The OP is talking about AA guns though, and I did find a mod for that;
http://www.subsim.com/radioroom/down...do=file&id=555
Which gives a single or double 20mm for the sugar boat, but no .50 cal. Which is odd, since all the subs had mountings on the bridge bulwarks for machine guns, that was a simple matter of welding a hollow cylinder to the side.