It is okay to use wood, you need to ensure that there is not pine or especially MDF dust in the sawdust that you are using. Approach with caution, unless you can absolutely guarantee the source of wood shaving/sawdust is what they say it is then leave it well alone. There are a lot of joiners using MDF and pine and to have a batch of oak or cherry contaminated with either of these products will render any food you smoke as inedible at best and actually quite dangerous.
If you'd rather enjoy a more DIY approach you can harvest wood after fresh autumn or spring winds. The best time for collecting wood is in the winter or very early spring before the sap rises. The sap will add moisture and a slightly bitter taste to your wood shavings due mainly to the higher resin and sap content of the wood. This can be avoided by choosing when to collect. I wouldn’t hold onto this rule, but if I had a choice, I would go for the winter harvested wood.