Use the set_post_thumbnail function.
set_post_thumbnail( $post_ID, $thumbnail_id );
Require you use WordPress 3.1.0 or later.
You need call this function after you have successfully created your post via wp_insert_post
and have a valid $post_ID
.