Sharp Deviations Bounds for Dirichlet Weighted Sums with Application to analysis of Bayesian algorithms