Yes it is possible, because the RSA key generation algorithm basically generates random numbers using a (cryptographically secure) pseudo-random number generator, until it finds some that are prime. By seeding the PRNG with your key, you can deterministically generate the key pair. You can similarly generate ECC key pairs using a password.
I should note that the resulting public key can be brute-forced: if someone knows you've been using this method to generate the key pairs, they can use it themselves and try many passwords to see if they get the same public key. If so, they have also found the private key. For this reason, you should use the same defenses against password hashes bruteforce as usual: use strong passwords, a slow/non-parallelizable key derivation function (such as scrypt, or the older PBKDF2), and salts. So the proposed method to use md5 to derive the key should not be used.
In Java, generating the key pair from the key would look like this (untested):
KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
generator.initialize(2048, new SecureRandom(key));
KeyPair keyPair = generator.generateKeyPair();