The general rule of thumb is do not excavate any closer than the width of the canopy. This is also called the drip line, the furthest point at which the branches extend from the trunk where water is dripped from the foliage.
It sounds like you have already plotted your wall, so I'm not sure if that is an option. If you get any closer know that if you come across a significant root, make a clean cut as opposed to ripping at it with a mini excavator.
Also, the type of wall matters. If you are getting that close know that the roots will not stop growing. Prefabbed concrete block is not a very sustainable option and could bow relatively quickly. Stone and mortar will do a better job of holding back the roots but eventually the tree roots will win. A quality dry stack of fieldstone could work as it can be maintained should bowing occur.