Statistics of optimal information flow in ensembles of regulatory motifs