We report how the unique temporal and spectral features of pulsed entangled photons from a parametric downconversion source can be utilized for manipulating electronic excitations through the optimization of their spectral phase. A new comprehensive optimization protocol based on Bayesian optimization has been developed in this work to selectively excite electronic states accessible by two-photon absorption. Using our optimization method, the entangled two-photon absorption probability for a thiophene dendrimer can be enhanced by up to a factor of 20, while classical light turns out to be nonoptimizable. Moreover, the optimization involving photon entanglement enables selective excitation that would not be possible otherwise. In addition to optimization, we have explored entangled two-photon absorption in the small entanglement time limit showing that entangled light can excite molecular electronic states that are vanishingly small for classical light. We demonstrate these opportunities with an application to a thiophene dendrimer.