Optimal approximation of piecewise smooth functions using deep ReLU neural networks