Technically, yes, since you both live there and own the house you could change the locks. Be aware that this is likely to have unintended consequences. This is the kind of move that can cause some real escalation in the friction and animosity level between you two. Ask yourself how you'd feel if you came back and found the locks changed. If you feel that you absolutely must change the locks, we suggest that you inform your soon-to-be-ex of it as a common courtesy.
Also be aware that changing the locks won't necessarily keep your soon-to-be-ex out of the house. He or she can return with the police, who may assist them in entering the home so they may remove their property.