You can know. Heaven is not earned. It is received as a gift by faith in Jesus Christ: “For by grace are ye saved through faith; and that not of yourselves: it is the gift of God: Not of works, lest any man should boast” (Ephesians 2:8-9). Admit that you are a sinner, realize you cannot save yourself, and trust in the blood Christ shed for you. God wants you to be sure. Listen the the Bible:

1 John 5:11-13 (KJV) And this is the record, that God hath given to us eternal life, and this life is in his Son. 12 He that hath the Son hath life; and he that hath not the Son of God hath not life.

13 These things have I written unto you that believe on the name of the Son of God; that ye may know that ye have eternal life, and that ye may believe on the name of the Son of God.

For on this subject, please check out The Knowledge and Assurance of Salvation.