You cant really prohibit units from picking up certain items, but what you can do is force the unit to drop the item immediately.
You write a trigger which checks for (event) "unit aquired item" or something along those lines. You use a condition which compares the type of the item to the item type you want to limit. You also check the units type.
If the item was picked up by an inappropriate unit type you force the unit to drop the item. There is an action in the "Hero" category which does that.