If there is a hole on the other side of the wall where you can see through from it, then yes, you can. You only need to be able to see the location where you want to teleport for the spell to work. If it is a complete wall instead with no holes at all, then it would not work.