Structure optimization of organic planar heterojunction solar cells