Yes, if there's a hole in the wall on the other side that you can see through, then you can. To use the spell, you only need to be able to see the place where you want to teleport. It would not work if it was a wall with no holes.