We can and will be perfect in heaven because it is a perfect realm, while this one is manifestly not. By "perfect" here is meant entire, whole, unmixed or pure, and so our world of earth is definitely not a perfect world, as it allows for a mixture of both good and evil, unlike the worlds of heaven and hell, where one is perfectly good and the other perfectly evil. This is a concept which is far easier for one to accept than it is to understand, as our race knows next to nothing about true and entire perfection, as we live in a world which disallows for true perfection, and it has always been so in the nature of our race since the fall of Adam.
The true, born again believer in Christ is currently in the possession of the Holy Spirit sent from Christ and that divine nature is properly perfect, as nothing else could ever come from a perfect Being such as He. However, this divine nature in a believer is contested in this world by a number of antagonistic elements, since it is still a world which allows for the presence of both good and evil. In heaven though that won't be a problem, as the perfect divine nature of God will then and there be entirely uncontested, as heaven is a truly perfect realm which does not allow for the admixture of evil in any way or at any time. You will then have the same, identical Holy Spirit of God that is in you now, only that divine nature will then have a flawlessly and continually perfect government over your celestial being, unlike our current imperfect status of unending occasions of defiance set against the divine nature in us, from everything to our ailing, faulty and perishing bodies constantly interrupting our service to God, to the restless temptations that daily assault us from both our near associates, the world and the tireless wiles of Satan.
Perfection in either physical or moral good is impossible in this life, (Christ's moral perfection being the sole exception,) while perfection is guaranteed in both the worlds of hell and heaven, only at opposite ends of morality or virtue. Since hell is a perfect or unmixed realm, it will encompass absolute and unexceptioned totality of evil, as there will be no good or virtuous influence there to ever counteract that evil or it wouldn't be a perfectly evil realm in the first place. Heaven is thankfully and blissfully the exact opposite, where evil has no place in their experience what-so-ever, and so the divine nature which is now contested in a believer on earth, will be totally or perfectly uncontested there, and so they cannot sin as they no longer have either the occasion or the capacity to sin in heaven. The saints in heaven, (for this reason,) are infallibly secure in their joyfully righteous state, while the damned are mournfully just as secure in their awful state of condemnation, a matter for endless "weeping and gnashing of teeth" as Christ solemnly forewarned us.
When the saint who currently believes in and loves the Lord Jesus, see's him standing in all his glory in heaven, he or she knows now that "...when He is revealed, we shall be like Him, for we shall see Him as He is." I John 3:2b, and so accordingly pursues a preparatory walk of holiness here in this life, as "...everyone who has this hope in Him purifies himself, just as He is pure." I John 3:3. That work of progressive holiness is only begun here and perfected there, and that is the reason why we will be sinless in heaven: We must be because He is and always will be, and our experience will be drawn from him then as now, only uncontested then and in that place. Christ will always be infinitely perfect and we will be finitely perfect, but both are still perfect relative to the capacity of their beings. If the Savior could ever become imperfect in heaven, then the saint abiding there could also fall from their flawless integrity, and that is something which will never, ever be, as God cannot cease to be.