Piezoelectric nanogenerators recently emerged as a turning point in the design of energy-aware and energy harvesting transmission scheme at the nanoscale. This work considers their adoption in diffusion-based molecular communications, proposing a power control strategy based on feedback control theory. In particular, the transmission power of an electrochemical nanodevice fed by a piezoelectric nanogenerator is dynamically set proportionally to the available energy budget, by using a closed-loop control scheme. The resulting system is analytically modeled with a discrete-time nonlinear state equation. The range of acceptable values of the proportional gain is theoretically derived by studying technological constraints and global asymptotic stability. The impact of the proportional gain on both output variance and time constant of the linearized system around the equilibrium point is also investigated. Computer simulations validate the theoretical analysis under different parameter settings. The comparison against state of the art transmission scheme also demonstrates the unique ability of the conceived approach to ensure, at the equilibrium, the targeted performance level.