Adaptive and Safe Bayesian Optimization in High Dimensions via One-Dimensional Subspaces