Modify form values before creating node
This is what the node api hooks are good for. 

From the docs:


  The node passed validation and is about to be saved. Modules may use
  this to make changes to the node before it is saved to the database.


You don't specify D6 or D7 

In D6 

hook_nodeapi() $op == 'presave'

In D7

hook_node_presave()

You can modify values in your implementations of these hooks and they will be saved. 

edit

If you need the NID you have to use hook_node_insert, but you will have to save to the DB directly.