You can use the product configurable type resource model to add a simple product to a configurable, e.g.:
$configurableId = 135;
$simpleId = 91;
$configurableProduct = Mage::getModel('catalog/product')->load($configurableId);
$simples = $configurableProduct->getTypeInstance('configurable', $configurableProduct)
->getUsedProductIds();
$simples[] = $simpleId;
Mage::getResourceModel('catalog/product_type_configurable')
->saveProducts($configurableProduct, $simples);