You'd want two packages, a base package and an extension. There's no way to license "part" of a package. The base package could detect the presence of the extension package, and call a method via an interface.
Base Package (namespace: basepack)
global class IPremiumVerifier {
Boolean isLicensed();
}
public class CheckPremium {
public static Boolean isLicensed() {
try {
return ((IPremiumVerifier)Type.forName('prempack','PremiumVerifier').newInstance()).isLicensed();
} catch(Exception e) {
return false;
}
}
}
Extension Package (namespace: prempack)
global class PremiumVerifier implements basepack.IPremiumVerifier {
global Boolean isLicensed() {
return UserInfo.isCurrentUserLicensed();
}
}