One of the main limitations of ultrasound imaging is that image quality and interpretation depend on the skill of the user and the experience of the clinician. Quantitative ultrasound (QUS) methods provide objective, system-independent estimates of tissue properties, such as acoustic attenuation and backscattering properties of tissue, which are valuable as objective tools for both diagnosis and intervention. Accurate and precise estimation of these properties requires correct compensation for intervening tissue attenuation. Prior attempts to estimate intervening-tissue attenuation based on minimizing cost functions that compared backscattered echo data to models have resulted in limited precision and accuracy. To overcome these limitations, in this paper, we incorporate the prior information of piecewise continuity of QUS parameters as a regularization term into our cost function. We further propose to calculate this cost function using dynamic programming (DP), a computationally efficient optimization algorithm that finds the global optimum. Our results on tissue-mimicking phantoms show that DP substantially outperforms a published least squares method in terms of both estimation bias and variance.