Yes. From the manuever section in the crb combat chapter "You can attempt to trip your opponent in place of a melee attack. " and "While many combat maneuvers can be performed as part of an attack action, full-attack action, or attack of opportunity (in place of a melee attack), "
Of course keep in mind that if you don't have Improved Trip (or something similar) yourself, your Trip attempt can be interrupted by an AoO from the creature you're using it on (and if you take damage while doing so, you receive a penalty equal to the damage dealt to you).
As a general rule, spells being cast as a swift action do not provoke, and many other swift actions do not provoke, either, but not all swift actions are safe.