Black-Box Approximation and Optimization with Hierarchical Tucker Decomposition