Absolutely. Motivation is more important to alignment, IMO, than action.
For example, if the PCs kill the wizard, thinking that he is a vile necromancer plotting to take over the world, then isn't evil.
If they murder the wizard to nick his equipment, that is.
At the end of the day, the...