Thanks for your answer. I have worked in a more elaborated example:
library(DirichletReg)
Bmax = 0.05 #Upper bound
nvar = 100 #Vector length
niter = 500 #Number of generations
p = 0.10
smax = 3 #Max shape parameter
b = rep(Bmax, length.out=nvar) #Vector of upper bounds
s1 = rev(rep(smax, length.out=p*nvar))
s2 = rep(1, times=(1-p)*nvar)
s = c(s1,s2) #Vector of shape parameters
r = DirichletReg::rdirichlet(niter, alpha=s) #Stochastic matrix generation
Basically, what I want is to build an stochastic matrix, in which no element exceeds the upper bound. However, I am not sure how can I truncate the results in an efficient way, especially because when smax is bigger, more and more rejection of samples is needed.