Not only could a wall (or high tech fence) be erected, the technology for it all exists (Israel has one and ours could be even better). The vociferous opposition to it for years by the open borders crowd is evidence that they know it would work. Of course it should have been there decades ago before so much damage was done. As for Mexico paying for it, as some posters indicated, taxes on Mexicans in America could pay for it if only there existed the collective will to impose them.
And I would suggest also a moat next to the wall with crocs in it.