Yes, for sure, you can perform what is called ephemeral-static Diffie-Hellman or static-static Diffie-Hellman where one or two parties are authenticated respectively.
Multiple schemes have been described in NIST SP 56A: Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography, sections 6.2 and 6.3.
You would of course need an additional (random) nonce if you use two static public/private key pairs. Otherwise there are no variable values in the equation and you would always generate the same session keys.
If you want to have a view of ephemeral-static Diffie Hellman then you don't have to look further than TLS 1.2, any ciphersuite that starts with DH or ECDH (without the E after it). They are not used much, generally ephemeral-ephemeral Diffie-Hellman is used with a separate authentication using RSA or ECDSA signatures. Certificates with a DH or ECDH public key are very rare indeed.
Key pair generation creates both the public and private keys and takes place on the machine of the owner of the key pair. Generally the private key should not leave this machine, except for backup purposes.
I'm not sure your sample algorithm complies with DH as specified in this standard document.