Say I'm building a Transmuter wizard who is going to specialize in melee combat through polymorph spells like monstrous physique and beast shape. If I take a level of monk or unnarmed fighter to get Improved Unarmed Strike and then take the Dragon Ferocity feat, can I use Dragon Ferocity with a polymorph shape's natural attacks?
Natural attacks and unarmed strikes are separate. I believe you are looking for Feral Combat Training.
Feral Combat Training (Combat)You were taught a style of martial arts that relies on the natural weapons from your racial ability or class feature.
Prerequisites: Improved Unarmed Strike, Weapon Focus with selected natural weapon.
Benefit: Choose one of your natural weapons. While using the selected natural weapon, you can apply the effects of feats that have Improved Unarmed Strike as a prerequisite.
Special: If you are a monk, you can use the selected natural weapon with your flurry of blows class feature.