Would the following work?
<rule>
<from>/products/product-detail.jsp\?productId=([0-9])</from>
<to type="permanent-redirect">/product-detail?id=$1</to>
</rule>
EDIT
Sorry. Forgot the slash above in front of the question mark, which is a reserved character within the regex, unless you escape it.
This caught me out yesterday actually, mainly down to copying directly from an old mod_rewrite rule we had in place.