Motivated by a medical application from lithotripsy, we study an optimal boundary control problem given by Westervelt equation -1/c(2) D(t)(2)u + Delta u + b/c(2) Delta(D(t)u) = -beta a/rho c(4) D(t)(2)u(2) in (0,T) x Omega (1) modeling the nonlinear evolution of the acoustic pressure u in a smooth, bounded domain Omega subset of R-d, d is an element of {1, 2, 3}. Here c > 0 is the speed of sound, b > 0 the diffusivity of sound, rho > 0 the mass density and beta(a) > 1 the parameter of nonlinearity. We study the optimization problem for existence of an optimal control and derive the first-order necessary optimality conditions. In addition, all results are extended for the more general Kuznetsov equation D-t(2)psi - c(2)Delta psi = D-t(b Delta psi + 1/c(2) B/2A (D-t psi)(2) + vertical bar del psi vertical bar(2)) (2) given in terms of the acoustic velocity potential psi.