Yes, you can. For the complete answer, in addition to thesunneversets' answer, an excerpt from the game's Comprehensive Rules:
702.15a Protection is a static ability, written "Protection from [quality]." This quality is usually a color (as in "protection from black") but can be any characteristic value. [..]
702.15b A permanent or player with protection can't be targeted by spells with the stated quality and can't be targeted by abilities from a source with the stated quality.
608.2b If the spell or ability specifies targets, it checks whether the targets are still legal. A target that's no longer in the zone it was in when it was targeted is illegal. Other changes to the game state may cause a target to no longer be legal; for example, its characteristics may have changed or an effect may have changed the text of the spell. If the source of an ability has left the zone it was in, its last known information is used during this process. The spell or ability is countered if all its targets, for every instance of the word "target," are now illegal. If the spell or ability is not countered, it will resolve normally. However, if any of its targets are illegal, the part of the spell or ability's effect for which it is an illegal target can't perform any actions on that target or make that target perform any actions. The effect may still determine information about illegal targets, though, and other parts of the effect for which those targets are not illegal may still affect them.
Example: Aura Blast is a white instant that reads, "Destroy target enchantment. Draw a card." If the enchantment isn't a legal target during Aura Blast's resolution (say, if it has gained protection from white or left the battlefield), then Aura Blast is countered. Its controller doesn't draw a card.[..]