Brewer's yeast is wonderful stuff--you really can't go wrong with it. And yes, it's best to prevent niacin deficiency rather than treat it later. Just sprinkle it on top of their feed and if you see symptoms, add more. If you want to be more precise, you can use 500mg of niacin from the pharmacy per gallon of water and dissolve it. Make sure you get old-fashioned basic niacin (it won't say that on the bottle--just avoid the slow-release or the flush-free sort) in gel caps--you can just open them up and pour it in the water--swish to dissolve.
But if it's easy to find, go for the brewer's yeast--it's much easier to use and safer. The other sort can be toxic if you get the dosage too high.