Probabilistic Circuits with Constraints via Convex Optimization