Rational design of type-II nano-heterojunctions for nanoscale optoelectronics