All you have to do is take your license to the magistrate, or pay the $10 pre-payable ticket. For your reading pleasure:
§ 46.2-104. Possession of registration cards; exhibiting registration card and licenses; failure to carry license or registration card.
The operator of any motor vehicle, trailer, or semitrailer being operated on the highways in the Commonwealth, shall have in his possession: (i) the registration card issued by the Department or the registration card issued by the state or country in which the motor vehicle, trailer, or semitrailer is registered, and (ii) his driver's license, learner's permit, or temporary driver's permit.
The owner or operator of any motor vehicle, trailer, or semitrailer shall stop on the signal of any law-enforcement officer who is in uniform or shows his badge or other sign of authority and shall, on the officer's request, exhibit his registration card, driver's license, learner's permit, or temporary driver's permit and write his name in the presence of the officer, if so required, for the purpose of establishing his identity.
Every person licensed by the Department as a driver or issued a learner's or temporary driver's permit who fails to carry his license or permit, and the registration card for the vehicle which he operates, shall be guilty of a traffic infraction and upon conviction punished by a fine of ten dollars. However, if any person summoned to appear before a court for failure to display his license, permit, or registration card presents to the officer issuing the summons or a magistrate of the county or city in which the summons was issued, before the return date of the summons, a license or permit issued to him prior to the time the summons was issued or a registration card, as the case may be, or appears pursuant to the summons and produces before the court a license or permit issued to him prior to the time the summons was issued or a registration card, as the case may be, he shall have complied with the provisions of this section.