Optimization of valuable chemicals production from C0₂ and renewable electricity in bioelectrochemical systems