$node_type = array(
'type' => 'temporary_node_type', // This is the machine name.
'name' => t('Temporary Node'), // This is the human name.
'base' => 'node_content', // If you set this to your module name, then
// *your module's* hook_insert(), hook_delete(),
// etc. will get called in addition to
// hook_node_*()
'description' => t('Description.')
// A full list of options is at http://api.drupal.org/hook_node_info.
);
$node_type = node_type_set_defaults($node_type);
node_type_save($node_type);
// Do something with your node type. You can also add fields here if you
// would like.
node_type_delete($node_type);
Note 1: People with the "administrator" role will see this type on node/add every once and a while, depending on how often you do this.
Note 2: You want to use something more then a hard-coded string for your type attribute to avoid collisions.