Yes,you can.
It was narrated in al-Saheehayn from ‘Aa’ishah that a man said to the Prophet (peace and blessings of Allaah be upon him): “My mother died suddenly and she did not leave a will, but I think that if she could have spoken she would have given in charity. Will she have a reward if I give in charity on her behalf?” The Prophet (peace and blessings of Allaah be upon him) said: “Yes.” Narrated by al-Bukhaari, no. 1388; Muslim, no. 1004